Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Duende.​IdentityServer.​Services.​ICache<​T>

Assembly: Duende.IdentityServer

Abstract interface to model data caching

Methods

GetAsync​(string key, System.​Threading.​CancellationToken ct)
Gets the cached data based upon a key index.
Returns The cached item, or <c>null</c> if no item matches the key.
key The key.
ct The cancellation token.
GetOrAddAsync​(string key, System.​TimeSpan duration, System.​Func<​System.​Threading.​Tasks.​Task<​T>> get, System.​Threading.​CancellationToken ct)
Gets the cached data based upon a key index. If the item is not found, the <c>get</c> function is used to obtain the item and populate the cache.
Returns The cached item.
key The key.
duration The duration.
get The function to obtain the item.
ct The cancellation token.
SetAsync​(string key, T item, System.​TimeSpan expiration, System.​Threading.​CancellationToken ct)
Caches the data based upon a key
key The key.
item The item.
expiration The expiration.
ct The cancellation token.
RemoveAsync​(string key, System.​Threading.​CancellationToken ct)
Removes the cached data based upon a key index.
key The key.
ct The cancellation token.